package com.kcsj.domain.user;
//201902104058胡庆阳

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Collection;
/**
 * @author 胡庆阳
 * 29th Nov. 2020
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User  implements Comparable<User>, Serializable {
	private Integer id;
	private String username;
	private String password;
	private String createTime;
	private String type;
	private Role role;
	private String code;
	private Boolean activationStatus;
	private Collection<Resource> resources;
	private Actor actor;

	public User(Integer id, String username, String password,boolean activationStatus) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.activationStatus = activationStatus;
	}

	public User(Integer id, String username, String password, String createTime, String type, Role role, Boolean activationStatus) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.type = type;
		this.createTime = createTime;
		this.role = role;
		this.activationStatus = activationStatus;
	}


	public User(Integer id, String username, String password, String type, Role role, Boolean activationStatus, Actor actor) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.type = type;
		this.role = role;
		this.activationStatus = activationStatus;
		this.actor = actor;
	}



	@Override
	public int compareTo(User o) {
		// TODO Auto-generated method stub
		return this.id-o.id;
	}

}
